import 'package:flutter/material.dart';
import 'package:flutter_deer/account/models/user_bank_entity.dart';
import 'package:flutter_deer/widgets/state_layout.dart';

class UserBankProvider extends ChangeNotifier {
  StateType? _stateType = StateType.loading;
  StateType? get stateType => _stateType;
  List<UserBankEntity>? _userBankList;
  List<UserBankEntity>? get userBankList => _userBankList;
  int? get itemCount => _userBankList!.length;

  Future<void> setUserBankList(List<UserBankEntity>? list) async{
    _userBankList = list;
    _stateType = StateType.bankCard;
    notifyListeners();
  }

  Future<void> setLoading() async {
    _stateType = StateType.loading;
    notifyListeners();
  }
}
